import { default as request,cloud } from '@/framework/utils/request'

// 查询转接信息列表
export function listSwitchGroupInfo(query) {
  return request({
    url: cloud.business + '/chatSwitchGroupInfo/page',
    method: 'get',
    params: query
  })
}

// 查询转接信息详细
export function getSwitchGroupInfo(id) {
  return request({
    url: cloud.business + '/chatSwitchGroupInfo/detail?id=' + id,
    method: 'get'
  })
}

// 新增转接信息
export function addSwitchGroupInfo(data) {
  return request({
    url: cloud.business + '/chatSwitchGroupInfo/add',
    method: 'post',
    data: data
  })
}

// 修改转接信息
export function updateSwitchGroupInfo(data) {
  return request({
    url: cloud.business + '/chatSwitchGroupInfo/edit',
    method: 'post',
    data: data
  })
}

// 删除转接信息
export function delSwitchGroupInfo(id) {
  return request({
    url: cloud.business + '/chatSwitchGroupInfo/delete',
    method: 'post',
    data: { ids: id }
  })
}

// 查询转接信息列表
export function getChatSwitchGroupInfoApi(data) {
  return request({
    url: cloud.business + '/chatSwitchGroupInfo/history/list',
    method: 'get',
    params: data
  })
}

// 转接接入操作
export function allocationSwitchInfoApi(data) {
  return request({
    url: cloud.business + '/chatSwitchGroupInfo/allocation',
    method: 'post',
    params: data
  })
}
